home *** CD-ROM | disk | FTP | other *** search
- unit QuickDrawRules;
-
- interface
-
- type
- qdRecord = record
- randSeed: longint;
- screenBits: BitMap;
- arrow: Cursor;
- case integer of
- 0: (
- dkGrey: Pattern;
- ltGrey: Pattern;
- grey: Pattern;
- black: Pattern;
- white: Pattern;
- thePort: GrafPtr;
- );
- 1: (
- dkGray: Pattern;
- ltGray: Pattern;
- gray: Pattern;
- );
- end;
- qdRecordPtr = ^qdRecord;
-
- function QDGlobals: qdRecordPtr;
- inline
- $2015, { move.l (a5),d0 ; get thePort }
- $0480, $0000, $007E, { subi.l #$0000007E, d0 ; #$7E = (sizeof(qdRecord) - sizeof(thePort)) }
- $2E80; { move.l d0,(sp) ; set result }
-
- implementation
-
- end. { QuickDrawRules }
-
- { Pascal for the above inline stuff }
-
- function QDGlobals: qdRecordPtr;
- type
- longPtr = ^longint;
- begin
- QDGlobals := qdRecordPtr(longPtr(SetCurrentA5)^ - (sizeof(qdRecord) - sizeof(thePort)));
- end; { QDGlobals }